<template>
	<view class="page bgf5">
		<view style="width: 100%;overflow: hidden;" v-html="content"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				name:'',
				content:''
			};
		},
		onLoad(option) {
			this.name = option.name;
			uni.setNavigationBarTitle({
				title: this.name
			})
			this.getInfo();
		},
		methods: {

			getInfo() {

			
				let that = this;
				let param = {
					name: this.name,
				};

				this.$api.articleInfo(param).then(res => {

					if (res.code == 1) {
						let newContent = res.data.content.replace(/\<img/gi,
							'<img style="max-width:100%;widht:100%,height:auto;display:block;"');
						that.content = newContent;	
					} else {
						
					}

				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.login {
		.w84 {
			width: 168rpx;
			height: 168rpx;
		}

		.w20 {
			width: 40rpx;
		}

		.w32 {
			width: 64rpx;
		}

		.mt180 {
			margin-top: 200rpx;
		}
	}
</style>
